package oa.hleast.xswl.service.article;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import oa.hleast.xswl.pojo.domain.SysDictItem;
import oa.hleast.xswl.pojo.domain.article.CmsArticle;
import oa.hleast.xswl.pojo.form.article.CmsArticleForm;
import oa.hleast.xswl.pojo.vo.DictItemValueByUserVO;
import oa.hleast.xswl.pojo.vo.article.CmsArticleVo;
import oa.hleast.xswl.pojo.vo.article.ShowArticleVo;

import java.util.List;

public interface IInformationCentreService extends IService<CmsArticle> {

    Page<ShowArticleVo> findPageShowList(Integer page, Integer limit, String dictItemInformationId);

    boolean add(CmsArticleForm article);

    boolean update(CmsArticleForm articleForm);

    Page<CmsArticleVo> pageList(Integer page, Integer limit, String title, Integer reviewStatus, String dicItemInformationId);

    boolean deleteByIds(List<String> asList);

    boolean review(Long id, Integer reviewStatus, String reason);

    CmsArticleVo detail(Long id);

    List<SysDictItem> findInformationType();

    List<DictItemValueByUserVO> findInformationTypeByUser(Long userId, boolean showAll);

    CmsArticleVo getCacheDetail(Long id, Long userId);

    Integer countById(Long id);

    Page<ShowArticleVo> findPageHotRecommendList(Integer page, Integer limit);

    List<CmsArticle> search(Integer page, Integer limit, String searchKey);

    CmsArticleVo getDetailByConfigKey(String configKey, Long userId);

    List<CmsArticleVo> findDetailByConfigKey(List<String> configKeyList, Long userId);
}
